<?php
defined('ROOTPATH') OR exit('No direct script access allowed');

use NoahBuscher\Macaw\Macaw;

Macaw::get('/', 'HomeController@home');
Macaw::get('/demo', 'HomeController@demo');

Macaw::error(function() {
    @header("HTTP/1.0 404 Not Found");
    echo    '<!DOCTYPE html><html>
            <head><title>404 Not Found</title></head>
            <body><div>404 (:-( Not Found</div></body></html>';
    exit();
});

Macaw::get('(:all)', function($pi) {
    @header("HTTP/1.0 404 Not Found");
    echo    '<!DOCTYPE html><html>
            <head><title>Unmatched routing</title></head>
            <body><div>Unmatched routing : '.$pi.'</div></body></html>';
    exit();
});

Macaw::dispatch();
